<html>
<head>
<title>File Source for Excel5.php</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">PHPExcel_Shared</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
        
                                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                      		  [ <a href="../classtrees_PHPExcel_Shared.html" class="menu">class tree: PHPExcel_Shared</a> ]
		  [ <a href="../elementindex_PHPExcel_Shared.html" class="menu">index: PHPExcel_Shared</a> ]
		  	    [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
      <b>Packages:</b><br />
              <a href="../li_PHPExcel.html">PHPExcel</a><br />
              <a href="../li_com-tecnick-tcpdf.html">com-tecnick-tcpdf</a><br />
              <a href="../li_JAMA.html">JAMA</a><br />
              <a href="../li_Math_Stats.html">Math_Stats</a><br />
              <a href="../li_PHPExcel_CachedObjectStorage.html">PHPExcel_CachedObjectStorage</a><br />
              <a href="../li_PHPExcel_Calculation.html">PHPExcel_Calculation</a><br />
              <a href="../li_PHPExcel_Cell.html">PHPExcel_Cell</a><br />
              <a href="../li_PHPExcel_Reader.html">PHPExcel_Reader</a><br />
              <a href="../li_PHPExcel_Reader_Excel5.html">PHPExcel_Reader_Excel5</a><br />
              <a href="../li_PHPExcel_Reader_Excel2007.html">PHPExcel_Reader_Excel2007</a><br />
              <a href="../li_PHPExcel_RichText.html">PHPExcel_RichText</a><br />
              <a href="../li_PHPExcel_Settings.html">PHPExcel_Settings</a><br />
              <a href="../li_PHPExcel_Shared.html">PHPExcel_Shared</a><br />
              <a href="../li_PHPExcel_Shared_Best_Fit.html">PHPExcel_Shared_Best_Fit</a><br />
              <a href="../li_PHPExcel_Shared_Escher.html">PHPExcel_Shared_Escher</a><br />
              <a href="../li_PHPExcel_Shared_OLE.html">PHPExcel_Shared_OLE</a><br />
              <a href="../li_PHPExcel_Shared_ZipArchive.html">PHPExcel_Shared_ZipArchive</a><br />
              <a href="../li_PHPExcel_Style.html">PHPExcel_Style</a><br />
              <a href="../li_PHPExcel_Worksheet.html">PHPExcel_Worksheet</a><br />
              <a href="../li_PHPExcel_Worksheet_Drawing.html">PHPExcel_Worksheet_Drawing</a><br />
              <a href="../li_PHPExcel_Writer.html">PHPExcel_Writer</a><br />
              <a href="../li_PHPExcel_Writer_Excel5.html">PHPExcel_Writer_Excel5</a><br />
              <a href="../li_PHPExcel_Writer_Excel2007.html">PHPExcel_Writer_Excel2007</a><br />
            <br /><br />
                  
      
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1 align="center">Source for file Excel5.php</h1>
<p>Documentation is available at <a href="../PHPExcel_Shared/_PHPExcel---Shared---Excel5.php.html">Excel5.php</a></p>
<div class="src-code">
<ol><li><div class="src-line"><a name="a1"></a><span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line"><a name="a2"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a3"></a><span class="src-doc">&nbsp;*&nbsp;PHPExcel</span></div></li>
<li><div class="src-line"><a name="a4"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a5"></a><span class="src-doc">&nbsp;*&nbsp;Copyright&nbsp;(c)&nbsp;2006&nbsp;-&nbsp;2011&nbsp;PHPExcel</span></div></li>
<li><div class="src-line"><a name="a6"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a7"></a><span class="src-doc">&nbsp;*&nbsp;This&nbsp;library&nbsp;is&nbsp;free&nbsp;software;&nbsp;you&nbsp;can&nbsp;redistribute&nbsp;it&nbsp;and/or</span></div></li>
<li><div class="src-line"><a name="a8"></a><span class="src-doc">&nbsp;*&nbsp;modify&nbsp;it&nbsp;under&nbsp;the&nbsp;terms&nbsp;of&nbsp;the&nbsp;GNU&nbsp;Lesser&nbsp;General&nbsp;Public</span></div></li>
<li><div class="src-line"><a name="a9"></a><span class="src-doc">&nbsp;*&nbsp;License&nbsp;as&nbsp;published&nbsp;by&nbsp;the&nbsp;Free&nbsp;Software&nbsp;Foundation;&nbsp;either</span></div></li>
<li><div class="src-line"><a name="a10"></a><span class="src-doc">&nbsp;*&nbsp;version&nbsp;2.1&nbsp;of&nbsp;the&nbsp;License,&nbsp;or&nbsp;(at&nbsp;your&nbsp;option)&nbsp;any&nbsp;later&nbsp;version.</span></div></li>
<li><div class="src-line"><a name="a11"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a12"></a><span class="src-doc">&nbsp;*&nbsp;This&nbsp;library&nbsp;is&nbsp;distributed&nbsp;in&nbsp;the&nbsp;hope&nbsp;that&nbsp;it&nbsp;will&nbsp;be&nbsp;useful,</span></div></li>
<li><div class="src-line"><a name="a13"></a><span class="src-doc">&nbsp;*&nbsp;but&nbsp;WITHOUT&nbsp;ANY&nbsp;WARRANTY;&nbsp;without&nbsp;even&nbsp;the&nbsp;implied&nbsp;warranty&nbsp;of</span></div></li>
<li><div class="src-line"><a name="a14"></a><span class="src-doc">&nbsp;*&nbsp;MERCHANTABILITY&nbsp;or&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE.&nbsp;&nbsp;See&nbsp;the&nbsp;GNU</span></div></li>
<li><div class="src-line"><a name="a15"></a><span class="src-doc">&nbsp;*&nbsp;Lesser&nbsp;General&nbsp;Public&nbsp;License&nbsp;for&nbsp;more&nbsp;details.</span></div></li>
<li><div class="src-line"><a name="a16"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a17"></a><span class="src-doc">&nbsp;*&nbsp;You&nbsp;should&nbsp;have&nbsp;received&nbsp;a&nbsp;copy&nbsp;of&nbsp;the&nbsp;GNU&nbsp;Lesser&nbsp;General&nbsp;Public</span></div></li>
<li><div class="src-line"><a name="a18"></a><span class="src-doc">&nbsp;*&nbsp;License&nbsp;along&nbsp;with&nbsp;this&nbsp;library;&nbsp;if&nbsp;not,&nbsp;write&nbsp;to&nbsp;the&nbsp;Free&nbsp;Software</span></div></li>
<li><div class="src-line"><a name="a19"></a><span class="src-doc">&nbsp;*&nbsp;Foundation,&nbsp;Inc.,&nbsp;51&nbsp;Franklin&nbsp;Street,&nbsp;Fifth&nbsp;Floor,&nbsp;Boston,&nbsp;MA&nbsp;&nbsp;02110-1301&nbsp;&nbsp;USA</span></div></li>
<li><div class="src-line"><a name="a20"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a21"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@category</span><span class="src-doc">&nbsp;&nbsp;&nbsp;PHPExcel</span></div></li>
<li><div class="src-line"><a name="a22"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;PHPExcel_Shared</span></div></li>
<li><div class="src-line"><a name="a23"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@copyright</span><span class="src-doc">&nbsp;&nbsp;Copyright&nbsp;(c)&nbsp;2006&nbsp;-&nbsp;2011&nbsp;PHPExcel&nbsp;(http://www.codeplex.com/PHPExcel)</span></div></li>
<li><div class="src-line"><a name="a24"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@license</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt&nbsp;&nbsp;&nbsp;&nbsp;LGPL</span></div></li>
<li><div class="src-line"><a name="a25"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@version</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;1.7.6,&nbsp;2011-02-27</span></div></li>
<li><div class="src-line"><a name="a26"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a27"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a28"></a><span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a29"></a><span class="src-doc">&nbsp;*&nbsp;PHPExcel_Shared_Excel5</span></div></li>
<li><div class="src-line"><a name="a30"></a><span class="src-doc">&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a31"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@category</span><span class="src-doc">&nbsp;&nbsp;&nbsp;PHPExcel</span></div></li>
<li><div class="src-line"><a name="a32"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@package</span><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;PHPExcel_Shared</span></div></li>
<li><div class="src-line"><a name="a33"></a><span class="src-doc">&nbsp;*&nbsp;</span><span class="src-doc-coretag">@copyright</span><span class="src-doc">&nbsp;&nbsp;Copyright&nbsp;(c)&nbsp;2006&nbsp;-&nbsp;2011&nbsp;PHPExcel&nbsp;(http://www.codeplex.com/PHPExcel)</span></div></li>
<li><div class="src-line"><a name="a34"></a><span class="src-doc">&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a35"></a><span class="src-key">class&nbsp;</span><a href="../PHPExcel_Shared/PHPExcel_Shared_Excel5.html">PHPExcel_Shared_Excel5</a></div></li>
<li><div class="src-line"><a name="a36"></a><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a37"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a38"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;the&nbsp;width&nbsp;of&nbsp;a&nbsp;column&nbsp;in&nbsp;pixels.&nbsp;We&nbsp;use&nbsp;the&nbsp;relationship&nbsp;y&nbsp;=&nbsp;ceil(7x)&nbsp;where</span></div></li>
<li><div class="src-line"><a name="a39"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;x&nbsp;is&nbsp;the&nbsp;width&nbsp;in&nbsp;intrinsic&nbsp;Excel&nbsp;units&nbsp;(measuring&nbsp;width&nbsp;in&nbsp;number&nbsp;of&nbsp;normal&nbsp;characters)</span></div></li>
<li><div class="src-line"><a name="a40"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;holds&nbsp;for&nbsp;Arial&nbsp;10</span></div></li>
<li><div class="src-line"><a name="a41"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a42"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">PHPExcel_Worksheet&nbsp;</span><span class="src-doc-var">$sheet&nbsp;</span><span class="src-doc">The&nbsp;sheet</span></div></li>
<li><div class="src-line"><a name="a43"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc-var">$col&nbsp;</span><span class="src-doc">The&nbsp;column</span></div></li>
<li><div class="src-line"><a name="a44"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc">The&nbsp;width&nbsp;in&nbsp;pixels</span></div></li>
<li><div class="src-line"><a name="a45"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a46"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../PHPExcel_Shared/PHPExcel_Shared_Excel5.html#methodsizeCol">sizeCol</a><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-var">$col&nbsp;</span>=&nbsp;<span class="src-str">'A'</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a47"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a48"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;default&nbsp;font&nbsp;of&nbsp;the&nbsp;workbook</span></div></li>
<li><div class="src-line"><a name="a49"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$font&nbsp;</span>=&nbsp;<span class="src-var">$sheet</span><span class="src-sym">-&gt;</span><span class="src-id">getParent</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">getDefaultStyle</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">getFont</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a50"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a51"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$columnDimensions&nbsp;</span>=&nbsp;<span class="src-var">$sheet</span><span class="src-sym">-&gt;</span><span class="src-id">getColumnDimensions</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a52"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a53"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;first&nbsp;find&nbsp;the&nbsp;true&nbsp;column&nbsp;width&nbsp;in&nbsp;pixels&nbsp;(uncollapsed&nbsp;and&nbsp;unhidden)</span></div></li>
<li><div class="src-line"><a name="a54"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(&nbsp;</span>isset<span class="src-sym">(</span><span class="src-var">$columnDimensions</span><span class="src-sym">[</span><span class="src-var">$col</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span><span class="src-key">and&nbsp;</span><span class="src-var">$columnDimensions</span><span class="src-sym">[</span><span class="src-var">$col</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span><span class="src-id">getWidth</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>!=&nbsp;-<span class="src-num">1&nbsp;</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a55"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a56"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;then&nbsp;we&nbsp;have&nbsp;column&nbsp;dimension&nbsp;with&nbsp;explicit&nbsp;width</span></div></li>
<li><div class="src-line"><a name="a57"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$columnDimension&nbsp;</span>=&nbsp;<span class="src-var">$columnDimensions</span><span class="src-sym">[</span><span class="src-var">$col</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a58"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$width&nbsp;</span>=&nbsp;<span class="src-var">$columnDimension</span><span class="src-sym">-&gt;</span><span class="src-id">getWidth</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a59"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$pixelWidth&nbsp;</span>=&nbsp;<span class="src-id"><a href="../PHPExcel_Shared/PHPExcel_Shared_Drawing.html">PHPExcel_Shared_Drawing</a></span><span class="src-sym">::</span><a href="../PHPExcel_Shared/PHPExcel_Shared_Drawing.html#methodcellDimensionToPixels">cellDimensionToPixels</a><span class="src-sym">(</span><span class="src-var">$width</span><span class="src-sym">,&nbsp;</span><span class="src-var">$font</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a60"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a61"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">-&gt;</span><span class="src-id">getDefaultColumnDimension</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">getWidth</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>!=&nbsp;-<span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a62"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a63"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;then&nbsp;we&nbsp;have&nbsp;default&nbsp;column&nbsp;dimension&nbsp;with&nbsp;explicit&nbsp;width</span></div></li>
<li><div class="src-line"><a name="a64"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$defaultColumnDimension&nbsp;</span>=&nbsp;<span class="src-var">$sheet</span><span class="src-sym">-&gt;</span><span class="src-id">getDefaultColumnDimension</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a65"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$width&nbsp;</span>=&nbsp;<span class="src-var">$defaultColumnDimension</span><span class="src-sym">-&gt;</span><span class="src-id">getWidth</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a66"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$pixelWidth&nbsp;</span>=&nbsp;<span class="src-id"><a href="../PHPExcel_Shared/PHPExcel_Shared_Drawing.html">PHPExcel_Shared_Drawing</a></span><span class="src-sym">::</span><a href="../PHPExcel_Shared/PHPExcel_Shared_Drawing.html#methodcellDimensionToPixels">cellDimensionToPixels</a><span class="src-sym">(</span><span class="src-var">$width</span><span class="src-sym">,&nbsp;</span><span class="src-var">$font</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a67"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a68"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a69"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a70"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;we&nbsp;don't&nbsp;even&nbsp;have&nbsp;any&nbsp;default&nbsp;column&nbsp;dimension.&nbsp;Width&nbsp;depends&nbsp;on&nbsp;default&nbsp;font</span></div></li>
<li><div class="src-line"><a name="a71"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$pixelWidth&nbsp;</span>=&nbsp;<span class="src-id"><a href="../PHPExcel_Shared/PHPExcel_Shared_Font.html">PHPExcel_Shared_Font</a></span><span class="src-sym">::</span><a href="../PHPExcel_Shared/PHPExcel_Shared_Font.html#methodgetDefaultColumnWidthByFont">getDefaultColumnWidthByFont</a><span class="src-sym">(</span><span class="src-var">$font</span><span class="src-sym">,&nbsp;</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a72"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a73"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a74"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;now&nbsp;find&nbsp;the&nbsp;effective&nbsp;column&nbsp;width&nbsp;in&nbsp;pixels</span></div></li>
<li><div class="src-line"><a name="a75"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$columnDimensions</span><span class="src-sym">[</span><span class="src-var">$col</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span><span class="src-key">and&nbsp;</span><span class="src-sym">!</span><span class="src-var">$columnDimensions</span><span class="src-sym">[</span><span class="src-var">$col</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span><span class="src-id">getVisible</span><span class="src-sym">(</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a76"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$effectivePixelWidth&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a77"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a78"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$effectivePixelWidth&nbsp;</span>=&nbsp;<span class="src-var">$pixelWidth</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a79"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a80"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a81"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$effectivePixelWidth</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a82"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a83"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a84"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a85"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Convert&nbsp;the&nbsp;height&nbsp;of&nbsp;a&nbsp;cell&nbsp;from&nbsp;user's&nbsp;units&nbsp;to&nbsp;pixels.&nbsp;By&nbsp;interpolation</span></div></li>
<li><div class="src-line"><a name="a86"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;relationship&nbsp;is:&nbsp;y&nbsp;=&nbsp;4/3x.&nbsp;If&nbsp;the&nbsp;height&nbsp;hasn't&nbsp;been&nbsp;set&nbsp;by&nbsp;the&nbsp;user&nbsp;we</span></div></li>
<li><div class="src-line"><a name="a87"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;use&nbsp;the&nbsp;default&nbsp;value.&nbsp;If&nbsp;the&nbsp;row&nbsp;is&nbsp;hidden&nbsp;we&nbsp;use&nbsp;a&nbsp;value&nbsp;of&nbsp;zero.</span></div></li>
<li><div class="src-line"><a name="a88"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a89"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">PHPExcel_Worksheet&nbsp;</span><span class="src-doc-var">$sheet&nbsp;</span><span class="src-doc">The&nbsp;sheet</span></div></li>
<li><div class="src-line"><a name="a90"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc-var">$row&nbsp;</span><span class="src-doc">The&nbsp;row&nbsp;index&nbsp;(1-based)</span></div></li>
<li><div class="src-line"><a name="a91"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc">The&nbsp;width&nbsp;in&nbsp;pixels</span></div></li>
<li><div class="src-line"><a name="a92"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a93"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../PHPExcel_Shared/PHPExcel_Shared_Excel5.html#methodsizeRow">sizeRow</a><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-var">$row&nbsp;</span>=&nbsp;<span class="src-num">1</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a94"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a95"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;default&nbsp;font&nbsp;of&nbsp;the&nbsp;workbook</span></div></li>
<li><div class="src-line"><a name="a96"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$font&nbsp;</span>=&nbsp;<span class="src-var">$sheet</span><span class="src-sym">-&gt;</span><span class="src-id">getParent</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">getDefaultStyle</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">getFont</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a97"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a98"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$rowDimensions&nbsp;</span>=&nbsp;<span class="src-var">$sheet</span><span class="src-sym">-&gt;</span><span class="src-id">getRowDimensions</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a99"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a100"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;first&nbsp;find&nbsp;the&nbsp;true&nbsp;row&nbsp;height&nbsp;in&nbsp;pixels&nbsp;(uncollapsed&nbsp;and&nbsp;unhidden)</span></div></li>
<li><div class="src-line"><a name="a101"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(&nbsp;</span>isset<span class="src-sym">(</span><span class="src-var">$rowDimensions</span><span class="src-sym">[</span><span class="src-var">$row</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span><span class="src-key">and&nbsp;</span><span class="src-var">$rowDimensions</span><span class="src-sym">[</span><span class="src-var">$row</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span><span class="src-id">getRowHeight</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>!=&nbsp;-<span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a102"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a103"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;then&nbsp;we&nbsp;have&nbsp;a&nbsp;row&nbsp;dimension</span></div></li>
<li><div class="src-line"><a name="a104"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$rowDimension&nbsp;</span>=&nbsp;<span class="src-var">$rowDimensions</span><span class="src-sym">[</span><span class="src-var">$row</span><span class="src-sym">]</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a105"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$rowHeight&nbsp;</span>=&nbsp;<span class="src-var">$rowDimension</span><span class="src-sym">-&gt;</span><span class="src-id">getRowHeight</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a106"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$pixelRowHeight&nbsp;</span>=&nbsp;(int)&nbsp;<a href="http://www.php.net/ceil">ceil</a><span class="src-sym">(</span><span class="src-num">4&nbsp;</span>*&nbsp;<span class="src-var">$rowHeight&nbsp;</span>/&nbsp;<span class="src-num">3</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;here&nbsp;we&nbsp;assume&nbsp;Arial&nbsp;10</span></div></li>
<li><div class="src-line"><a name="a107"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a108"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">-&gt;</span><span class="src-id">getDefaultRowDimension</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">getRowHeight</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;</span>!=&nbsp;-<span class="src-num">1</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a109"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a110"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;then&nbsp;we&nbsp;have&nbsp;a&nbsp;default&nbsp;row&nbsp;dimension&nbsp;with&nbsp;explicit&nbsp;height</span></div></li>
<li><div class="src-line"><a name="a111"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$defaultRowDimension&nbsp;</span>=&nbsp;<span class="src-var">$sheet</span><span class="src-sym">-&gt;</span><span class="src-id">getDefaultRowDimension</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a112"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$rowHeight&nbsp;</span>=&nbsp;<span class="src-var">$defaultRowDimension</span><span class="src-sym">-&gt;</span><span class="src-id">getRowHeight</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a113"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$pixelRowHeight&nbsp;</span>=&nbsp;<span class="src-id"><a href="../PHPExcel_Shared/PHPExcel_Shared_Drawing.html">PHPExcel_Shared_Drawing</a></span><span class="src-sym">::</span><a href="../PHPExcel_Shared/PHPExcel_Shared_Drawing.html#methodpointsToPixels">pointsToPixels</a><span class="src-sym">(</span><span class="src-var">$rowHeight</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a114"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a115"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a116"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a117"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;we&nbsp;don't&nbsp;even&nbsp;have&nbsp;any&nbsp;default&nbsp;row&nbsp;dimension.&nbsp;Height&nbsp;depends&nbsp;on&nbsp;default&nbsp;font</span></div></li>
<li><div class="src-line"><a name="a118"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$pointRowHeight&nbsp;</span>=&nbsp;<span class="src-id"><a href="../PHPExcel_Shared/PHPExcel_Shared_Font.html">PHPExcel_Shared_Font</a></span><span class="src-sym">::</span><a href="../PHPExcel_Shared/PHPExcel_Shared_Font.html#methodgetDefaultRowHeightByFont">getDefaultRowHeightByFont</a><span class="src-sym">(</span><span class="src-var">$font</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a119"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$pixelRowHeight&nbsp;</span>=&nbsp;<span class="src-id"><a href="../PHPExcel_Shared/PHPExcel_Shared_Font.html">PHPExcel_Shared_Font</a></span><span class="src-sym">::</span><a href="../PHPExcel_Shared/PHPExcel_Shared_Font.html#methodfontSizeToPixels">fontSizeToPixels</a><span class="src-sym">(</span><span class="src-var">$pointRowHeight</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a120"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a121"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a122"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a123"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;now&nbsp;find&nbsp;the&nbsp;effective&nbsp;row&nbsp;height&nbsp;in&nbsp;pixels</span></div></li>
<li><div class="src-line"><a name="a124"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(&nbsp;</span>isset<span class="src-sym">(</span><span class="src-var">$rowDimensions</span><span class="src-sym">[</span><span class="src-var">$row</span><span class="src-sym">]</span><span class="src-sym">)&nbsp;</span><span class="src-key">and&nbsp;</span><span class="src-sym">!</span><span class="src-var">$rowDimensions</span><span class="src-sym">[</span><span class="src-var">$row</span><span class="src-sym">]</span><span class="src-sym">-&gt;</span><span class="src-id">getVisible</span><span class="src-sym">(</span><span class="src-sym">)&nbsp;)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a125"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$effectivePixelRowHeight&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a126"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}&nbsp;</span><span class="src-key">else&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a127"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$effectivePixelRowHeight&nbsp;</span>=&nbsp;<span class="src-var">$pixelRowHeight</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a128"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a129"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a130"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$effectivePixelRowHeight</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a131"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a132"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a133"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a134"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;the&nbsp;horizontal&nbsp;distance&nbsp;in&nbsp;pixels&nbsp;between&nbsp;two&nbsp;anchors</span></div></li>
<li><div class="src-line"><a name="a135"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;distanceX&nbsp;is&nbsp;found&nbsp;as&nbsp;sum&nbsp;of&nbsp;all&nbsp;the&nbsp;spanning&nbsp;columns&nbsp;widths&nbsp;minus&nbsp;correction&nbsp;for&nbsp;the&nbsp;two&nbsp;offsets</span></div></li>
<li><div class="src-line"><a name="a136"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a137"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">PHPExcel_Worksheet&nbsp;</span><span class="src-doc-var">$sheet&nbsp;</span></div></li>
<li><div class="src-line"><a name="a138"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$startColumn&nbsp;</span></div></li>
<li><div class="src-line"><a name="a139"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc-var">$startOffset&nbsp;</span><span class="src-doc">Offset&nbsp;within&nbsp;start&nbsp;cell&nbsp;measured&nbsp;in&nbsp;1/1024&nbsp;of&nbsp;the&nbsp;cell&nbsp;width</span></div></li>
<li><div class="src-line"><a name="a140"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$endColumn&nbsp;</span></div></li>
<li><div class="src-line"><a name="a141"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc-var">$endOffset&nbsp;</span><span class="src-doc">Offset&nbsp;within&nbsp;end&nbsp;cell&nbsp;measured&nbsp;in&nbsp;1/1024&nbsp;of&nbsp;the&nbsp;cell&nbsp;width</span></div></li>
<li><div class="src-line"><a name="a142"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc">Horizontal&nbsp;measured&nbsp;in&nbsp;pixels</span></div></li>
<li><div class="src-line"><a name="a143"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a144"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../PHPExcel_Shared/PHPExcel_Shared_Excel5.html#methodgetDistanceX">getDistanceX</a><span class="src-sym">(</span><span class="src-id">PHPExcel_Worksheet&nbsp;</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-var">$startColumn&nbsp;</span>=&nbsp;<span class="src-str">'A'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$startOffsetX&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-var">$endColumn&nbsp;</span>=&nbsp;<span class="src-str">'A'</span><span class="src-sym">,&nbsp;</span><span class="src-var">$endOffsetX&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a145"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a146"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$distanceX&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a147"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a148"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;add&nbsp;the&nbsp;widths&nbsp;of&nbsp;the&nbsp;spanning&nbsp;columns</span></div></li>
<li><div class="src-line"><a name="a149"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$startColumnIndex&nbsp;</span>=&nbsp;<span class="src-id"><a href="../PHPExcel_Cell/PHPExcel_Cell.html">PHPExcel_Cell</a></span><span class="src-sym">::</span><a href="../PHPExcel_Cell/PHPExcel_Cell.html#methodcolumnIndexFromString">columnIndexFromString</a><span class="src-sym">(</span><span class="src-var">$startColumn</span><span class="src-sym">)&nbsp;</span>-&nbsp;<span class="src-num">1</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;1-based</span></div></li>
<li><div class="src-line"><a name="a150"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$endColumnIndex&nbsp;</span>=&nbsp;<span class="src-id"><a href="../PHPExcel_Cell/PHPExcel_Cell.html">PHPExcel_Cell</a></span><span class="src-sym">::</span><a href="../PHPExcel_Cell/PHPExcel_Cell.html#methodcolumnIndexFromString">columnIndexFromString</a><span class="src-sym">(</span><span class="src-var">$endColumn</span><span class="src-sym">)&nbsp;</span>-&nbsp;<span class="src-num">1</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;1-based</span></div></li>
<li><div class="src-line"><a name="a151"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">for&nbsp;</span><span class="src-sym">(</span><span class="src-var">$i&nbsp;</span>=&nbsp;<span class="src-var">$startColumnIndex</span><span class="src-sym">;&nbsp;</span><span class="src-var">$i&nbsp;</span>&lt;=&nbsp;<span class="src-var">$endColumnIndex</span><span class="src-sym">;&nbsp;</span>++<span class="src-var">$i</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a152"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$distanceX&nbsp;</span>+=&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeCol</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../PHPExcel_Cell/PHPExcel_Cell.html">PHPExcel_Cell</a></span><span class="src-sym">::</span><a href="../PHPExcel_Cell/PHPExcel_Cell.html#methodstringFromColumnIndex">stringFromColumnIndex</a><span class="src-sym">(</span><span class="src-var">$i</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a153"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a154"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a155"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;correct&nbsp;for&nbsp;offsetX&nbsp;in&nbsp;startcell</span></div></li>
<li><div class="src-line"><a name="a156"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$distanceX&nbsp;</span>-=&nbsp;(int)&nbsp;<a href="http://www.php.net/floor">floor</a><span class="src-sym">(</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeCol</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-var">$startColumn</span><span class="src-sym">)&nbsp;</span>*&nbsp;<span class="src-var">$startOffsetX&nbsp;</span>/&nbsp;<span class="src-num">1024</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a157"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a158"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;correct&nbsp;for&nbsp;offsetX&nbsp;in&nbsp;endcell</span></div></li>
<li><div class="src-line"><a name="a159"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$distanceX&nbsp;</span>-=&nbsp;(int)&nbsp;<a href="http://www.php.net/floor">floor</a><span class="src-sym">(</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeCol</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-var">$endColumn</span><span class="src-sym">)&nbsp;</span>*&nbsp;<span class="src-sym">(</span><span class="src-num">1&nbsp;</span>-&nbsp;<span class="src-var">$endOffsetX&nbsp;</span>/&nbsp;<span class="src-num">1024</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a160"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a161"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$distanceX</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a162"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a163"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a164"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a165"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Get&nbsp;the&nbsp;vertical&nbsp;distance&nbsp;in&nbsp;pixels&nbsp;between&nbsp;two&nbsp;anchors</span></div></li>
<li><div class="src-line"><a name="a166"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;distanceY&nbsp;is&nbsp;found&nbsp;as&nbsp;sum&nbsp;of&nbsp;all&nbsp;the&nbsp;spanning&nbsp;rows&nbsp;minus&nbsp;two&nbsp;offsets</span></div></li>
<li><div class="src-line"><a name="a167"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a168"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">PHPExcel_Worksheet&nbsp;</span><span class="src-doc-var">$sheet&nbsp;</span></div></li>
<li><div class="src-line"><a name="a169"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$startRow&nbsp;</span><span class="src-doc">(1-based)</span></div></li>
<li><div class="src-line"><a name="a170"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc-var">$startOffset&nbsp;</span><span class="src-doc">Offset&nbsp;within&nbsp;start&nbsp;cell&nbsp;measured&nbsp;in&nbsp;1/256&nbsp;of&nbsp;the&nbsp;cell&nbsp;height</span></div></li>
<li><div class="src-line"><a name="a171"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$endRow&nbsp;</span><span class="src-doc">(1-based)</span></div></li>
<li><div class="src-line"><a name="a172"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc-var">$endOffset&nbsp;</span><span class="src-doc">Offset&nbsp;within&nbsp;end&nbsp;cell&nbsp;measured&nbsp;in&nbsp;1/256&nbsp;of&nbsp;the&nbsp;cell&nbsp;height</span></div></li>
<li><div class="src-line"><a name="a173"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc">Vertical&nbsp;distance&nbsp;measured&nbsp;in&nbsp;pixels</span></div></li>
<li><div class="src-line"><a name="a174"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a175"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../PHPExcel_Shared/PHPExcel_Shared_Excel5.html#methodgetDistanceY">getDistanceY</a><span class="src-sym">(</span><span class="src-id">PHPExcel_Worksheet&nbsp;</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-var">$startRow&nbsp;</span>=&nbsp;<span class="src-num">1</span><span class="src-sym">,&nbsp;</span><span class="src-var">$startOffsetY&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">,&nbsp;</span><span class="src-var">$endRow&nbsp;</span>=&nbsp;<span class="src-num">1</span><span class="src-sym">,&nbsp;</span><span class="src-var">$endOffsetY&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a176"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a177"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$distanceY&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a178"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a179"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;add&nbsp;the&nbsp;widths&nbsp;of&nbsp;the&nbsp;spanning&nbsp;rows</span></div></li>
<li><div class="src-line"><a name="a180"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">for&nbsp;</span><span class="src-sym">(</span><span class="src-var">$row&nbsp;</span>=&nbsp;<span class="src-var">$startRow</span><span class="src-sym">;&nbsp;</span><span class="src-var">$row&nbsp;</span>&lt;=&nbsp;<span class="src-var">$endRow</span><span class="src-sym">;&nbsp;</span>++<span class="src-var">$row</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a181"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$distanceY&nbsp;</span>+=&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeRow</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-var">$row</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a182"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a183"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a184"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;correct&nbsp;for&nbsp;offsetX&nbsp;in&nbsp;startcell</span></div></li>
<li><div class="src-line"><a name="a185"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$distanceY&nbsp;</span>-=&nbsp;(int)&nbsp;<a href="http://www.php.net/floor">floor</a><span class="src-sym">(</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeRow</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-var">$startRow</span><span class="src-sym">)&nbsp;</span>*&nbsp;<span class="src-var">$startOffsetY&nbsp;</span>/&nbsp;<span class="src-num">256</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a186"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a187"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;correct&nbsp;for&nbsp;offsetX&nbsp;in&nbsp;endcell</span></div></li>
<li><div class="src-line"><a name="a188"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$distanceY&nbsp;</span>-=&nbsp;(int)&nbsp;<a href="http://www.php.net/floor">floor</a><span class="src-sym">(</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeRow</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-var">$endRow</span><span class="src-sym">)&nbsp;</span>*&nbsp;<span class="src-sym">(</span><span class="src-num">1&nbsp;</span>-&nbsp;<span class="src-var">$endOffsetY&nbsp;</span>/&nbsp;<span class="src-num">256</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a189"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a190"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;</span><span class="src-var">$distanceY</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a191"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a192"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a193"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-doc">/**</span></div></li>
<li><div class="src-line"><a name="a194"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Convert&nbsp;1-cell&nbsp;anchor&nbsp;coordinates&nbsp;to&nbsp;2-cell&nbsp;anchor&nbsp;coordinates</span></div></li>
<li><div class="src-line"><a name="a195"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;This&nbsp;function&nbsp;is&nbsp;ported&nbsp;from&nbsp;PEAR&nbsp;Spreadsheet_Writer_Excel&nbsp;with&nbsp;small&nbsp;modifications</span></div></li>
<li><div class="src-line"><a name="a196"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a197"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Calculate&nbsp;the&nbsp;vertices&nbsp;that&nbsp;define&nbsp;the&nbsp;position&nbsp;of&nbsp;the&nbsp;image&nbsp;as&nbsp;required&nbsp;by</span></div></li>
<li><div class="src-line"><a name="a198"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;OBJ&nbsp;record.</span></div></li>
<li><div class="src-line"><a name="a199"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a200"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+------------+------------+</span></div></li>
<li><div class="src-line"><a name="a201"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;B&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</span></div></li>
<li><div class="src-line"><a name="a202"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;+-----+------------+------------+</span></div></li>
<li><div class="src-line"><a name="a203"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|(x1,y1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</span></div></li>
<li><div class="src-line"><a name="a204"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;1&nbsp;&nbsp;|(A1)._______|______&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</span></div></li>
<li><div class="src-line"><a name="a205"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</span></div></li>
<li><div class="src-line"><a name="a206"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</span></div></li>
<li><div class="src-line"><a name="a207"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;+-----+----|&nbsp;&nbsp;&nbsp;&nbsp;BITMAP&nbsp;&nbsp;&nbsp;&nbsp;|-----+</span></div></li>
<li><div class="src-line"><a name="a208"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</span></div></li>
<li><div class="src-line"><a name="a209"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;2&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;|______________.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</span></div></li>
<li><div class="src-line"><a name="a210"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(B2)|</span></div></li>
<li><div class="src-line"><a name="a211"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(x2,y2)|</span></div></li>
<li><div class="src-line"><a name="a212"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;+----&nbsp;+------------+------------+</span></div></li>
<li><div class="src-line"><a name="a213"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a214"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Example&nbsp;of&nbsp;a&nbsp;bitmap&nbsp;that&nbsp;covers&nbsp;some&nbsp;of&nbsp;the&nbsp;area&nbsp;from&nbsp;cell&nbsp;A1&nbsp;to&nbsp;cell&nbsp;B2.</span></div></li>
<li><div class="src-line"><a name="a215"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a216"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;Based&nbsp;on&nbsp;the&nbsp;width&nbsp;and&nbsp;height&nbsp;of&nbsp;the&nbsp;bitmap&nbsp;we&nbsp;need&nbsp;to&nbsp;calculate&nbsp;8&nbsp;vars:</span></div></li>
<li><div class="src-line"><a name="a217"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$col_start,&nbsp;$row_start,&nbsp;$col_end,&nbsp;$row_end,&nbsp;$x1,&nbsp;$y1,&nbsp;$x2,&nbsp;$y2.</span></div></li>
<li><div class="src-line"><a name="a218"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;width&nbsp;and&nbsp;height&nbsp;of&nbsp;the&nbsp;cells&nbsp;are&nbsp;also&nbsp;variable&nbsp;and&nbsp;have&nbsp;to&nbsp;be&nbsp;taken&nbsp;into</span></div></li>
<li><div class="src-line"><a name="a219"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;account.</span></div></li>
<li><div class="src-line"><a name="a220"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;values&nbsp;of&nbsp;$col_start&nbsp;and&nbsp;$row_start&nbsp;are&nbsp;passed&nbsp;in&nbsp;from&nbsp;the&nbsp;calling</span></div></li>
<li><div class="src-line"><a name="a221"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;function.&nbsp;The&nbsp;values&nbsp;of&nbsp;$col_end&nbsp;and&nbsp;$row_end&nbsp;are&nbsp;calculated&nbsp;by&nbsp;subtracting</span></div></li>
<li><div class="src-line"><a name="a222"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;the&nbsp;width&nbsp;and&nbsp;height&nbsp;of&nbsp;the&nbsp;bitmap&nbsp;from&nbsp;the&nbsp;width&nbsp;and&nbsp;height&nbsp;of&nbsp;the</span></div></li>
<li><div class="src-line"><a name="a223"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;underlying&nbsp;cells.</span></div></li>
<li><div class="src-line"><a name="a224"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;The&nbsp;vertices&nbsp;are&nbsp;expressed&nbsp;as&nbsp;a&nbsp;percentage&nbsp;of&nbsp;the&nbsp;underlying&nbsp;cell&nbsp;width&nbsp;as</span></div></li>
<li><div class="src-line"><a name="a225"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;follows&nbsp;(rhs&nbsp;values&nbsp;are&nbsp;in&nbsp;pixels):</span></div></li>
<li><div class="src-line"><a name="a226"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a227"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x1&nbsp;=&nbsp;X&nbsp;/&nbsp;W&nbsp;*1024</span></div></li>
<li><div class="src-line"><a name="a228"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y1&nbsp;=&nbsp;Y&nbsp;/&nbsp;H&nbsp;*256</span></div></li>
<li><div class="src-line"><a name="a229"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x2&nbsp;=&nbsp;(X-1)&nbsp;/&nbsp;W&nbsp;*1024</span></div></li>
<li><div class="src-line"><a name="a230"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y2&nbsp;=&nbsp;(Y-1)&nbsp;/&nbsp;H&nbsp;*256</span></div></li>
<li><div class="src-line"><a name="a231"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a232"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Where:&nbsp;&nbsp;X&nbsp;is&nbsp;distance&nbsp;from&nbsp;the&nbsp;left&nbsp;side&nbsp;of&nbsp;the&nbsp;underlying&nbsp;cell</span></div></li>
<li><div class="src-line"><a name="a233"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Y&nbsp;is&nbsp;distance&nbsp;from&nbsp;the&nbsp;top&nbsp;of&nbsp;the&nbsp;underlying&nbsp;cell</span></div></li>
<li><div class="src-line"><a name="a234"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;W&nbsp;is&nbsp;the&nbsp;width&nbsp;of&nbsp;the&nbsp;cell</span></div></li>
<li><div class="src-line"><a name="a235"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;H&nbsp;is&nbsp;the&nbsp;height&nbsp;of&nbsp;the&nbsp;cell</span></div></li>
<li><div class="src-line"><a name="a236"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*</span></div></li>
<li><div class="src-line"><a name="a237"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">PHPExcel_Worksheet&nbsp;</span><span class="src-doc-var">$sheet&nbsp;</span></div></li>
<li><div class="src-line"><a name="a238"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">string&nbsp;</span><span class="src-doc-var">$coordinates&nbsp;</span><span class="src-doc">E.g.&nbsp;'A1'</span></div></li>
<li><div class="src-line"><a name="a239"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc-var">$offsetX&nbsp;</span><span class="src-doc">Horizontal&nbsp;offset&nbsp;in&nbsp;pixels</span></div></li>
<li><div class="src-line"><a name="a240"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc-var">$offsetY&nbsp;</span><span class="src-doc">Vertical&nbsp;offset&nbsp;in&nbsp;pixels</span></div></li>
<li><div class="src-line"><a name="a241"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc-var">$width&nbsp;</span><span class="src-doc">Width&nbsp;in&nbsp;pixels</span></div></li>
<li><div class="src-line"><a name="a242"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@param&nbsp;</span><span class="src-doc-type">integer&nbsp;</span><span class="src-doc-var">$height&nbsp;</span><span class="src-doc">Height&nbsp;in&nbsp;pixels</span></div></li>
<li><div class="src-line"><a name="a243"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*&nbsp;</span><span class="src-doc-coretag">@return&nbsp;</span><span class="src-doc-type">array&nbsp;</span></div></li>
<li><div class="src-line"><a name="a244"></a><span class="src-doc">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></div></li>
<li><div class="src-line"><a name="a245"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">public&nbsp;</span><span class="src-key">static&nbsp;</span><span class="src-key">function&nbsp;</span><a href="../PHPExcel_Shared/PHPExcel_Shared_Excel5.html#methodoneAnchor2twoAnchor">oneAnchor2twoAnchor</a><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-var">$coordinates</span><span class="src-sym">,&nbsp;</span><span class="src-var">$offsetX</span><span class="src-sym">,&nbsp;</span><span class="src-var">$offsetY</span><span class="src-sym">,&nbsp;</span><span class="src-var">$width</span><span class="src-sym">,&nbsp;</span><span class="src-var">$height</span><span class="src-sym">)</span></div></li>
<li><div class="src-line"><a name="a246"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a247"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list<span class="src-sym">(</span><span class="src-var">$column</span><span class="src-sym">,&nbsp;</span><span class="src-var">$row</span><span class="src-sym">)&nbsp;</span>=&nbsp;<span class="src-id"><a href="../PHPExcel_Cell/PHPExcel_Cell.html">PHPExcel_Cell</a></span><span class="src-sym">::</span><a href="../PHPExcel_Cell/PHPExcel_Cell.html#methodcoordinateFromString">coordinateFromString</a><span class="src-sym">(</span><span class="src-var">$coordinates</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a248"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$col_start&nbsp;</span>=&nbsp;<span class="src-id"><a href="../PHPExcel_Cell/PHPExcel_Cell.html">PHPExcel_Cell</a></span><span class="src-sym">::</span><a href="../PHPExcel_Cell/PHPExcel_Cell.html#methodcolumnIndexFromString">columnIndexFromString</a><span class="src-sym">(</span><span class="src-var">$column</span><span class="src-sym">)&nbsp;</span>-&nbsp;<span class="src-num">1</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a249"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$row_start&nbsp;</span>=&nbsp;<span class="src-var">$row&nbsp;</span>-&nbsp;<span class="src-num">1</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a250"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a251"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$x1&nbsp;</span>=&nbsp;<span class="src-var">$offsetX</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a252"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$y1&nbsp;</span>=&nbsp;<span class="src-var">$offsetY</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a253"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a254"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Initialise&nbsp;end&nbsp;cell&nbsp;to&nbsp;the&nbsp;same&nbsp;as&nbsp;the&nbsp;start&nbsp;cell</span></div></li>
<li><div class="src-line"><a name="a255"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$col_end&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-var">$col_start</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-comm">//&nbsp;Col&nbsp;containing&nbsp;lower&nbsp;right&nbsp;corner&nbsp;of&nbsp;object</span></div></li>
<li><div class="src-line"><a name="a256"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$row_end&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-var">$row_start</span><span class="src-sym">;&nbsp;&nbsp;</span><span class="src-comm">//&nbsp;Row&nbsp;containing&nbsp;bottom&nbsp;right&nbsp;corner&nbsp;of&nbsp;object</span></div></li>
<li><div class="src-line"><a name="a257"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a258"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Zero&nbsp;the&nbsp;specified&nbsp;offset&nbsp;if&nbsp;greater&nbsp;than&nbsp;the&nbsp;cell&nbsp;dimensions</span></div></li>
<li><div class="src-line"><a name="a259"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$x1&nbsp;</span>&gt;=&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeCol</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../PHPExcel_Cell/PHPExcel_Cell.html">PHPExcel_Cell</a></span><span class="src-sym">::</span><a href="../PHPExcel_Cell/PHPExcel_Cell.html#methodstringFromColumnIndex">stringFromColumnIndex</a><span class="src-sym">(</span><span class="src-var">$col_start</span><span class="src-sym">)))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a260"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$x1&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a261"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a262"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-var">$y1&nbsp;</span>&gt;=&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeRow</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-var">$row_start&nbsp;</span>+&nbsp;<span class="src-num">1</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a263"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$y1&nbsp;</span>=&nbsp;<span class="src-num">0</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a264"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a265"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a266"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$width&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-var">$width&nbsp;&nbsp;</span>+&nbsp;<span class="src-var">$x1&nbsp;</span>-<span class="src-num">1</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a267"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$height&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>=&nbsp;<span class="src-var">$height&nbsp;</span>+&nbsp;<span class="src-var">$y1&nbsp;</span>-<span class="src-num">1</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a268"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a269"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Subtract&nbsp;the&nbsp;underlying&nbsp;cell&nbsp;widths&nbsp;to&nbsp;find&nbsp;the&nbsp;end&nbsp;cell&nbsp;of&nbsp;the&nbsp;image</span></div></li>
<li><div class="src-line"><a name="a270"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while&nbsp;</span><span class="src-sym">(</span><span class="src-var">$width&nbsp;</span>&gt;=&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeCol</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../PHPExcel_Cell/PHPExcel_Cell.html">PHPExcel_Cell</a></span><span class="src-sym">::</span><a href="../PHPExcel_Cell/PHPExcel_Cell.html#methodstringFromColumnIndex">stringFromColumnIndex</a><span class="src-sym">(</span><span class="src-var">$col_end</span><span class="src-sym">)))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a271"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$width&nbsp;</span>-=&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeCol</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../PHPExcel_Cell/PHPExcel_Cell.html">PHPExcel_Cell</a></span><span class="src-sym">::</span><a href="../PHPExcel_Cell/PHPExcel_Cell.html#methodstringFromColumnIndex">stringFromColumnIndex</a><span class="src-sym">(</span><span class="src-var">$col_end</span><span class="src-sym">))</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a272"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;++<span class="src-var">$col_end</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a273"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a274"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a275"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Subtract&nbsp;the&nbsp;underlying&nbsp;cell&nbsp;heights&nbsp;to&nbsp;find&nbsp;the&nbsp;end&nbsp;cell&nbsp;of&nbsp;the&nbsp;image</span></div></li>
<li><div class="src-line"><a name="a276"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">while&nbsp;</span><span class="src-sym">(</span><span class="src-var">$height&nbsp;</span>&gt;=&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeRow</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-var">$row_end&nbsp;</span>+&nbsp;<span class="src-num">1</span><span class="src-sym">))&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a277"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$height&nbsp;</span>-=&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeRow</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-var">$row_end&nbsp;</span>+&nbsp;<span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a278"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;++<span class="src-var">$row_end</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a279"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a280"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a281"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Bitmap&nbsp;isn't&nbsp;allowed&nbsp;to&nbsp;start&nbsp;or&nbsp;finish&nbsp;in&nbsp;a&nbsp;hidden&nbsp;cell,&nbsp;i.e.&nbsp;a&nbsp;cell</span></div></li>
<li><div class="src-line"><a name="a282"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;with&nbsp;zero&nbsp;height&nbsp;or&nbsp;width.</span></div></li>
<li><div class="src-line"><a name="a283"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeCol</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../PHPExcel_Cell/PHPExcel_Cell.html">PHPExcel_Cell</a></span><span class="src-sym">::</span><a href="../PHPExcel_Cell/PHPExcel_Cell.html#methodstringFromColumnIndex">stringFromColumnIndex</a><span class="src-sym">(</span><span class="src-var">$col_start</span><span class="src-sym">))&nbsp;</span>==&nbsp;<span class="src-num">0</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a284"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a285"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a286"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeCol</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../PHPExcel_Cell/PHPExcel_Cell.html">PHPExcel_Cell</a></span><span class="src-sym">::</span><a href="../PHPExcel_Cell/PHPExcel_Cell.html#methodstringFromColumnIndex">stringFromColumnIndex</a><span class="src-sym">(</span><span class="src-var">$col_end</span><span class="src-sym">))&nbsp;&nbsp;&nbsp;</span>==&nbsp;<span class="src-num">0</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a287"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a288"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a289"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeRow</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-var">$row_start&nbsp;</span>+&nbsp;<span class="src-num">1</span><span class="src-sym">)&nbsp;</span>==&nbsp;<span class="src-num">0</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a290"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a291"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a292"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">if&nbsp;</span><span class="src-sym">(</span><span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeRow</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-var">$row_end&nbsp;</span>+&nbsp;<span class="src-num">1</span><span class="src-sym">)&nbsp;&nbsp;&nbsp;</span>==&nbsp;<span class="src-num">0</span><span class="src-sym">)&nbsp;</span><span class="src-sym">{</span></div></li>
<li><div class="src-line"><a name="a293"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a294"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a295"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a296"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Convert&nbsp;the&nbsp;pixel&nbsp;values&nbsp;to&nbsp;the&nbsp;percentage&nbsp;value&nbsp;expected&nbsp;by&nbsp;Excel</span></div></li>
<li><div class="src-line"><a name="a297"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$x1&nbsp;</span>=&nbsp;<span class="src-var">$x1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>/&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeCol</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../PHPExcel_Cell/PHPExcel_Cell.html">PHPExcel_Cell</a></span><span class="src-sym">::</span><a href="../PHPExcel_Cell/PHPExcel_Cell.html#methodstringFromColumnIndex">stringFromColumnIndex</a><span class="src-sym">(</span><span class="src-var">$col_start</span><span class="src-sym">))&nbsp;&nbsp;&nbsp;</span>*&nbsp;<span class="src-num">1024</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a298"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$y1&nbsp;</span>=&nbsp;<span class="src-var">$y1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>/&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeRow</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-var">$row_start&nbsp;</span>+&nbsp;<span class="src-num">1</span><span class="src-sym">)&nbsp;&nbsp;&nbsp;</span>*&nbsp;&nbsp;<span class="src-num">256</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a299"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$x2&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-var">$width&nbsp;</span>+&nbsp;<span class="src-num">1</span><span class="src-sym">)&nbsp;&nbsp;</span>/&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeCol</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-id"><a href="../PHPExcel_Cell/PHPExcel_Cell.html">PHPExcel_Cell</a></span><span class="src-sym">::</span><a href="../PHPExcel_Cell/PHPExcel_Cell.html#methodstringFromColumnIndex">stringFromColumnIndex</a><span class="src-sym">(</span><span class="src-var">$col_end</span><span class="src-sym">))&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>*&nbsp;<span class="src-num">1024</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;Distance&nbsp;to&nbsp;right&nbsp;side&nbsp;of&nbsp;object</span></div></li>
<li><div class="src-line"><a name="a300"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$y2&nbsp;</span>=&nbsp;<span class="src-sym">(</span><span class="src-var">$height&nbsp;</span>+&nbsp;<span class="src-num">1</span><span class="src-sym">)&nbsp;</span>/&nbsp;<span class="src-id">self</span><span class="src-sym">::</span><span class="src-id">sizeRow</span><span class="src-sym">(</span><span class="src-var">$sheet</span><span class="src-sym">,&nbsp;</span><span class="src-var">$row_end&nbsp;</span>+&nbsp;<span class="src-num">1</span><span class="src-sym">)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>*&nbsp;&nbsp;<span class="src-num">256</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;Distance&nbsp;to&nbsp;bottom&nbsp;of&nbsp;object</span></div></li>
<li><div class="src-line"><a name="a301"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a302"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$startCoordinates&nbsp;</span>=&nbsp;<span class="src-id"><a href="../PHPExcel_Cell/PHPExcel_Cell.html">PHPExcel_Cell</a></span><span class="src-sym">::</span><a href="../PHPExcel_Cell/PHPExcel_Cell.html#methodstringFromColumnIndex">stringFromColumnIndex</a><span class="src-sym">(</span><span class="src-var">$col_start</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-sym">(</span><span class="src-var">$row_start&nbsp;</span>+&nbsp;<span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a303"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$endCoordinates&nbsp;</span>=&nbsp;<span class="src-id"><a href="../PHPExcel_Cell/PHPExcel_Cell.html">PHPExcel_Cell</a></span><span class="src-sym">::</span><a href="../PHPExcel_Cell/PHPExcel_Cell.html#methodstringFromColumnIndex">stringFromColumnIndex</a><span class="src-sym">(</span><span class="src-var">$col_end</span><span class="src-sym">)&nbsp;</span>.&nbsp;<span class="src-sym">(</span><span class="src-var">$row_end&nbsp;</span>+&nbsp;<span class="src-num">1</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a304"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a305"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$twoAnchor&nbsp;</span>=&nbsp;<span class="src-key">array</span><span class="src-sym">(</span></div></li>
<li><div class="src-line"><a name="a306"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'startCoordinates'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$startCoordinates</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a307"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'startOffsetX'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$x1</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a308"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'startOffsetY'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$y1</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a309"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'endCoordinates'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$endCoordinates</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a310"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'endOffsetX'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$x2</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a311"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-str">'endOffsetY'&nbsp;</span>=&gt;&nbsp;<span class="src-var">$y2</span><span class="src-sym">,</span></div></li>
<li><div class="src-line"><a name="a312"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a313"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a314"></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">return&nbsp;&nbsp;</span><span class="src-var">$twoAnchor</span><span class="src-sym">;</span></div></li>
<li><div class="src-line"><a name="a315"></a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line"><a name="a316"></a>&nbsp;</div></li>
<li><div class="src-line"><a name="a317"></a><span class="src-sym">}</span></div></li>
</ol>
</div>
        <div class="credit">
		    <hr />
		    Documentation generated on Sun, 27 Feb 2011 16:31:14 -0800 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.3</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>